package E2018;

import javax.swing.*;
import java.awt.*;
public class Exams3 extends JFrame {
    public Exams3(){
        this.setTitle("奥运五环");
        this.setSize(500,400);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
    }
    public void paint(Graphics g){
        JPanel j = new JPanel();
        j.paint(g);
        j.setOpaque(false);

        g.setColor(Color.blue);
        g.drawOval(70,70,80,80);

        g.setColor(Color.black);
        g.drawOval(140,70,80,80);

        g.setColor(Color.red);
        g.drawOval(210,70,80,80);

        g.setColor(Color.yellow);
        g.drawOval(105,130,80,80);

        g.setColor(Color.green);
        g.drawOval(175,130,80,80);

        g.drawString("奥运五环",150,250);
        g.setColor(Color.blue);
    }
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                new Exams3();
            }
        });
    }
}
